package com.zhang.network.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhang.network.model.NetworkUser;
import com.zhang.network.model.User;
import com.zhang.network.model.network.NetworkUserAddDTO;
import com.zhang.network.model.network.NetworkUserVo;
import com.zhang.network.model.network.SecondNetworkQueryDTO;

import java.util.List;

/**
 * 服务类
 *
 * @author zhangshuaiyin
 * @since 2021-04-03
 */
public interface NetworkUserService extends IService<NetworkUser> {

    /**
     * 根据人脉圈 id 获取其成员列表
     *
     * @param networkId
     * @return
     */
    List<NetworkUserVo> getUsersByNetworkId(Integer networkId);

    /**
     * 给人脉圈新增成员
     *
     * @param dto
     */
    void insertNetworkUsers(NetworkUserAddDTO dto);

    /**
     * 删除人脉圈中的某个成员
     *
     * @param networkUser
     */
    void deleteUserOfNetwork(NetworkUser networkUser);

    /**
     * 人脉圈内不存在的成员
     *
     * @param networkId
     * @return
     */
    List<User> getUsersNotInNetworkById(Integer networkId);

    /**
     * 查找好友的二度人脉
     *
     * @param dto
     * @return
     */
    Page<User> getSecondNetwork(SecondNetworkQueryDTO dto);

    /*    Page<NetworkUserVo> pageUsersByNetwork(NetworkUserQueryDTO dto);*/
}
